home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_069 / spool / gripe.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  103 lines

  1. /* gripe. - Standardized complainer under Intuition */
  2.  
  3. /*
  4. **    Date written: 09/18/86
  5. **    Author: Tim Holloway
  6. **        Compuserve: 73026,2026
  7. **        Bix: tholloway
  8. **        Fido node: 112/3 (Casa Mi Amiga).
  9. **
  10. **    Version: 1.0
  11. **
  12. **    Copyright (C) 1986, by Tim Holloway.  This program may be
  13. **    freely distributed for non-commercial use only.  Use for commercial
  14. **    purposes without the express permission of the author is a violation
  15. **    of copyright law.
  16. **
  17. **    Description:
  18. **      displays a requester with up to three lines of text.
  19. **
  20. **    Change History: 
  21. **
  22. **    None
  23. **
  24. **    Usage: Gripe (line1, line2, line3);
  25. **
  26. **    All are TEXT *;
  27. **
  28. **    Quirks: Builds stuff that MUST be done in CHIP memory.  Use
  29. **    ATOM or something to place the DATA segment in CHIP memory!
  30. **    Intuition Library MUST be open prior to this call.
  31. **    If you need less than 3 lines of text, use "", although I think
  32. **    that NULL is OK by Commodore.
  33. */
  34.  
  35. /* Basic Amiga system definitions */
  36.  
  37. #include <exec/types.h>
  38. #include <libraries/dos.h>
  39. #include <libraries/dosextens.h>
  40. #include <graphics/gfx.h>
  41. #include <intuition/intuition.h>
  42.  
  43. void Gripe (msg1, msg2, msg3)
  44. TEXT *msg1, *msg2, *msg3;
  45. {
  46.  
  47. /*----------
  48.     struct Window *wp;
  49.  
  50.     static struct NewWindow nwindow = {
  51.         0, 0, 300, 50, AUTOFRONTPEN, AUTOBACKPEN, 0,
  52.         0, NULL, NULL, "PRTSPOOL", NULL, NULL,
  53.         0, 0, 0, 0, WBENCHSCREEN
  54.     };
  55. -----------*/
  56.  
  57.     static struct IntuiText msg0[3] = {
  58.         { AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE,
  59.           AUTOLEFTEDGE, AUTOTOPEDGE, AUTOITEXTFONT,
  60.           NULL,
  61.           &msg0[1]},
  62.  
  63.         { AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE,
  64.           AUTOLEFTEDGE, AUTOTOPEDGE+8, AUTOITEXTFONT,
  65.           NULL,
  66.           &msg0[2]},
  67.  
  68.         { AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE,
  69.           AUTOLEFTEDGE, AUTOTOPEDGE+16, AUTOITEXTFONT,
  70.           NULL,
  71.           NULL}
  72.     };
  73.  
  74.     static struct IntuiText drat = {
  75.          AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE,
  76.          AUTOLEFTEDGE, AUTOTOPEDGE, AUTOITEXTFONT,
  77.          (APTR) "Rats!",
  78.          NULL
  79.     };
  80.  
  81.     msg0[0].IText = msg1;
  82.     msg0[1].IText = msg2;
  83.     msg0[2].IText = msg3;
  84.     (void) AutoRequest (NULL, &msg0, NULL, &drat,  0, 0, 300, 66);
  85. }
  86.  
  87.  
  88. #if STAND_ALONE_TEST
  89.  
  90. struct Library *IntuitionBase, *OpenLibrary();
  91.  
  92. main()
  93. {
  94.     if ( (IntuitionBase = OpenLibrary("intuition.library", 20)) == NULL)
  95.     {
  96.         printf ("Couldn't open Intuition library!\n");
  97.         exit(20);
  98.     }
  99.     Gripe ("THis is a", "Gripe", "test");
  100.     CloseLibrary(IntuitionBase);
  101. }
  102. #endif
  103.